package game.ability;

import java.util.Random;

import game.entity.AbsSprite;
import game.entity.SpriteManager;
import game.particles.AbsParticle;
import game.particles.ParticleCloudFire;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class AbilityCloudFire extends AbsAbility{

	private AbsParticle particleCloudFire;
	public AbilityCloudFire() {
		super();
		particleCloudFire = new ParticleCloudFire();
	}
	
	@Override
	public void action() {
		Random random = new Random();
		if (targetSprites.count() > 0)
			for(int i=0; i< targetSprites.count(); i++){
				targetSprites.getByIndex(i).setHp(targetSprites.getByIndex(i).getHp() - random.nextInt(100));
			}
	}

	@Override
	public void render(SpriteBatch sb) {
		particleCloudFire.render(sb);
	}

	@Override
	public void update() {
		particleCloudFire.update();
	}
	
	//Chua cai dat
	
	@Override
	public void setTarget(AbsSprite _targetSprite) {
		// TODO Auto-generated method stub
		super.setTarget(_targetSprite);
	}

	@Override
	public void setTarget(SpriteManager _targetSprites) {
		// TODO Auto-generated method stub
		super.setTarget(_targetSprites);
	}

	@Override
	public void addTarget(AbsSprite _targetSprite) {
		// TODO Auto-generated method stub
		super.addTarget(_targetSprite);
	}

	@Override
	public void removeTarget(int spriteId) {
		// TODO Auto-generated method stub
		super.removeTarget(spriteId);
	}
	
}
